package com.orm.tools.h5;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class StudentTest {
    public static void main(String args[])
    {
    	Student s=new Student();

    	s.setAge(8);
    	s.setName("����8");
    	Configuration cfg=new Configuration();
    SessionFactory sf=	cfg.configure().buildSessionFactory();
    Session session=sf.openSession();
    session.beginTransaction();
    	session.save(s);
    	session.getTransaction().commit();
    	session.close();
    	sf.close();
    	
    }
}
